package com.gitee.wsl.common.ui.theme


interface ColorPaletteFactory<T: ColorPaletteScheme>{
    fun  build(name:String):T?

    fun getSuportColorThemeList():List<String>
}

class DefaultColorPaletteFactory: ColorPaletteFactory<ColorPaletteScheme> {

    override fun  build(name: String): ColorPaletteScheme? {
        return when(name){
            ColorPalette_Frappe -> Frappe()
            ColorPalette_Mocha -> Mocha()
            ColorPalette_Latte -> Latte()
            ColorPalette_Macchiato -> Macchiato()
            ColorPalette_DARK -> Dark()
            ColorPalette_LIGHT -> Light()
            //ColorPalette_SYSTEM -> SystemPalette()
            else -> null
        }
    }

    override fun getSuportColorThemeList(): List<String> {
        return listOf(
            ColorPalette_DARK, ColorPalette_LIGHT ,
            ColorPalette_SYSTEM,
            ColorPalette_Frappe,
            ColorPalette_Mocha,
            ColorPalette_Latte,
            ColorPalette_Macchiato
        )
    }

}